<admintpl file="header" />
<style>
.well{font-size:12px;}
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input{
padding:0px;
}
.table>thead>tr>th{border-bottom:none;}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">供应商管理</a></li>
			<li class=""><a href="admin.php?g=Admin&m=Homesys&a=add">添加供应商</a></li>
		</ul>
		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="30">User ID</th>
						<th width="90">标题</th>
						<th width="60">副标题</th>
						<th width="60">用户照片</th>
						<th width="60">技能类别</th>
						<th width="90">推荐指数</th>
						<th width="90">价格</th>
						<th width="90">排 序</th>
						<th width="90">时间</th>
						<th width="60">操作</th>
					</tr>
				</thead>
				<foreach name="thedata" item="data">
					<tr>
						<td><b>{$data['id']}</b></td>
						<td><b>{$data['title']}</b></td>
						<td><b>{$data['subtitle']}</b></td>
						<td><b><if condition="!empty($data['photo'])"><img width="100" src="data/upload/{$data['photo']}" /></if></b></td>
						<td><b>{$data['skill_type']}</b></td>
						<td><b>{$data['star']}</b></td>
						<td><b>{$data['price']}</b></td>
						<td><b>{$data['order']}</b></td>
						<td><b>{$data['createtime']}</b></td>
						<td>
							<a href="admin.php?g=Admin&m=homesys&a=edit&id={$data['id']}&p={$postData['p']}">编辑</a>
						</td>
					</tr>	
				</foreach>			
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="public/js/common.js"></script>
	<script>
		$(function() {
			setCookie("refersh_time", 0);
			Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
				//批量复制
				$('.js-articles-copy').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/index.php?g=portal&m=AdminPost&a=copy&ids="+ ids, {
						title : "批量复制",
						width : "300px"
					});
				});
				//批量移动
				$('.js-articles-move').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/admin.php?g=portal&m=AdminPost&a=move&old_term_id=0&ids="+ ids, {
						title : "批量移动",
						width : "300px"
					});
				});
			});
		});
	</script>
</body>
</html>